/* Use this script if you need to support IE 7 and IE 6. */

window.onload = function () {
    function addIcon(el, entity) {
        var html = el.innerHTML;
        el.innerHTML = '<span style="font-family: \'icomoon\'">' + entity + '</span>' + html;
    }

    var icons = {
        'idox-icon-cog':'&#x61;',
        'idox-icon-search':'&#x73;',
        'idox-icon-comments':'&#x6d;',
        'idox-icon-user':'&#x70;',
        'idox-icon-arrow-right':'&#x66;',
        'idox-icon-arrow-left':'&#x62;',
        'idox-icon-time':'&#x22;',
        'idox-icon-loading':'&#x21;',
        'idox-icon-loading-2':'&#x6c;',
        'idox-icon-busy':'&#x23;',
        'idox-icon-feed':'&#x25;',
        'idox-icon-delicious':'&#x26;',
        'idox-icon-grid-view':'&#x24;',
        'idox-icon-fullscreen':'&#x27;'
    },
        els = document.getElementsByTagName('*'),
        i, attr, html, c, el;
    for (i = 0; i < els.length; i += 1) {
        el = els[i];
        attr = el.getAttribute('data-icon');
        if (attr) {
            addIcon(el, attr);
        }
        c = el.className;
        c = c.match(/icon-[^\s'"]+/);
        if (c) {
            addIcon(el, icons[c[0]]);
        }
    }
};